package cn.com.anypay.manager.payment.dto;

import java.util.Map;

/**
 * 查询请求数据传输对象
 *
 * 用于查询支付订单状态
 *
 * @author AnyPay Team
 * @version 1.0
 * @since 2025-07-05
 */
public class QueryRequestDTO {

    /**
     * 商户订单号
     */
    private String merchantOrderId;

    /**
     * 渠道订单号
     */
    private String channelOrderId;

    /**
     * 支付渠道ID
     */
    private String channelId;

    /**
     * 查询类型：ORDER(订单查询)、REFUND(退款查询)
     */
    private String queryType = "ORDER";

    /**
     * 扩展参数
     */
    private Map<String, Object> extParams;

    public QueryRequestDTO() {
    }

    public QueryRequestDTO(String merchantOrderId, String channelId) {
        this.merchantOrderId = merchantOrderId;
        this.channelId = channelId;
    }

    public QueryRequestDTO(String merchantOrderId, String channelOrderId, String channelId) {
        this.merchantOrderId = merchantOrderId;
        this.channelOrderId = channelOrderId;
        this.channelId = channelId;
    }

    // Getters and Setters
    public String getMerchantOrderId() {
        return merchantOrderId;
    }

    public void setMerchantOrderId(String merchantOrderId) {
        this.merchantOrderId = merchantOrderId;
    }

    public String getChannelOrderId() {
        return channelOrderId;
    }

    public void setChannelOrderId(String channelOrderId) {
        this.channelOrderId = channelOrderId;
    }

    public String getChannelId() {
        return channelId;
    }

    public void setChannelId(String channelId) {
        this.channelId = channelId;
    }

    public String getQueryType() {
        return queryType;
    }

    public void setQueryType(String queryType) {
        this.queryType = queryType;
    }

    public Map<String, Object> getExtParams() {
        return extParams;
    }

    public void setExtParams(Map<String, Object> extParams) {
        this.extParams = extParams;
    }

    @Override
    public String toString() {
        return "QueryRequest{" +
                "merchantOrderId='" + merchantOrderId + '\'' +
                ", channelOrderId='" + channelOrderId + '\'' +
                ", channelId='" + channelId + '\'' +
                ", queryType='" + queryType + '\'' +
                ", extParams=" + extParams +
                '}';
    }
}